//Michele Gregori 2009 miclegr@gmail.com

#ifndef MDUALQUATERNION_H
#define MDUALQUATERNION_H

#include<maya/MMatrix.h>
#include<maya/MPoint.h>

class MPoint;

class MDualQuaternion{
	public:
	double real[4];
	double dual[4];
	MDualQuaternion();
	MDualQuaternion(const MMatrix& mat);
	MDualQuaternion operator+=(MDualQuaternion toSum);
	MDualQuaternion operator-=(MDualQuaternion toSub);
	MDualQuaternion operator*(double scale);
	void operator=(MDualQuaternion dq);
	MMatrix asMatrix();
	MDualQuaternion normalize();
	void cross(double vect1[4],double vect2[4],double (&crossed)[4]);
	void mulPoint(MPoint &point);
	double dot(MDualQuaternion dq);
};

#endif
